﻿using Glue;
using Glue.Converters;
using Xunit;

namespace GlueExamples.ReportedIssues
{
    public class EmptyMethodInNestedMember
    {
        [Fact]
        public void Run()
        {
            var c1 = new Class1() { Class3 = new Class3() };
            var c2 = new Class2();
            var mapping = new Mapping<Class1, Class2>();
            mapping.AddConverter(new Class3ToClass4Converter());
            mapping.Relate(leftSide => leftSide.Class3, rightSide => rightSide.Class4);
            var t = mapping.Map(c1, c2);
        }
    }

    public class Class1 { public Class3 Class3  { get; set; } }
    public class Class2 { public Class4 Class4 { get; set; } }
    public class Class4 {}
    public class Class3 {}

    public class Class3ToClass4Converter : BaseSimpleConverter<Class3, Class4>
    {
        public override Class3 MapTowardsLeft(Class4 from)
        {
            return new Class3();
        }

        public override Class4 MapTowardsRight(Class3 from)
        {
            return new Class4();
        }
    }


}
